package com.fudan.gamestore.mapper;

import com.fudan.gamestore.pojo.Game;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GameMapper {
    List<Game> getAllGame();

    List<Game> getGameByIdList(@Param("gameIdList") List<Integer> gameIdList);

    Game getGameById(@Param("gameId") Integer gameId);

    Integer insertGame(Game game);

    List<Integer> getOwnGameIdByUserId(@Param("userId") Integer userId);

    Integer deleteGame(@Param("gameId") Integer gameId);

    Integer updateGame(Game game);

    Integer addOwnGame(@Param("userId") Integer userId, @Param("gameIdList") List<Integer> gameIdList);

    Integer addGameSaleCount(@Param("gameIdList") List<Integer> gameIdList);

}
